﻿<UserControl x:Class="ViewParametrerNouveauGroupe"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xml:lang="fr-FR"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="600">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <GroupBox Header="Gerer les Groupes Artificiels" Grid.ColumnSpan="3">

            <StackPanel >
                <StackPanel Orientation="Horizontal"  >
                    <TextBlock Text="Groupes" VerticalAlignment="Center" Margin="0,0,10,0"  />
                    <ComboBox MinWidth="200" Margin="0,0,10,0" ItemsSource="{Binding ListeGroupesArtificiels}" SelectedItem="{Binding Path=GroupeArtificielActif, Mode=TwoWay}" />
                    <Button Background="White" Content="Creer un nouveau groupe" Margin="0,0,10,0" Padding="2" Name="BtCreerGroupeArtificiel" />
                    <Button Background="White" Content="Modifier le groupe selectionné" Margin="0,0,10,0" Padding="2"/>
                    <Button Background="White" Content="Supprimer le groupe selectionné" Margin="0,0,10,0" Padding="2"/>

                </StackPanel>
                <Grid Margin="5" Visibility="Visible" Name="NouveauGroupeArtificielGrid">
                    <Grid.RowDefinitions>
                        <RowDefinition  />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition />
                        <ColumnDefinition Width="Auto" />

                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Nom du Groupe" VerticalAlignment="Center" Margin="5" />
                    <TextBlock MinWidth="200" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding Path=GroupeArtificielActif}"  />

                    <TextBlock Text="Annee de reference" VerticalAlignment="Center" Margin="5" Grid.Row="1" />
                    <TextBox Text="{Binding Path=GroupeArtificielActifAnneeReference, Mode=TwoWay}"  MinWidth="200" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="1" />
  
                    <TextBlock Text="Notion de generation" VerticalAlignment="Center" Margin="5" Grid.Row="2" />
                    <UniformGrid Columns="2" MinWidth="200" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="2" >
                        <RadioButton Content="Avec" GroupName="NotionGeneration" IsChecked="{Binding Path=GroupeArtificielActifNotionGeneration, Mode=TwoWay}" />
                        <RadioButton Content="Sans"  GroupName="NotionGeneration"/>
                    </UniformGrid>

                    <TextBlock Text="Garanties supportées" VerticalAlignment="Center" Margin="5" Grid.Row="3" />
                    <UniformGrid Columns="3" MinWidth="300" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="3" >
                        <CheckBox Content="DC" IsChecked="{Binding Path=GroupeArtificielActifGarantieDC, Mode=TwoWay}" />
                        <CheckBox Content="IT" IsChecked="{Binding Path=GroupeArtificielActifGarantieIT, Mode=TwoWay}"/>
                        <CheckBox Content="PE" IsChecked="{Binding Path=GroupeArtificielActifGarantiePE, Mode=TwoWay}"/>
                    </UniformGrid>
                </Grid>
            </StackPanel>

        </GroupBox>

        <GroupBox Grid.Row="1" Header="Nouveaux Groupes PMT">
            <StackPanel>
                <DataGrid ColumnWidth="*" IsReadOnly="True" ItemsSource="{Binding ListeNouveauGroupe}"  />
                <DataGrid ColumnWidth="*" IsReadOnly="True" ItemsSource="{Binding ListeGroupeActif}"  />
            </StackPanel>
        </GroupBox>
        <StackPanel Grid.Column="2" Grid.Row="2" VerticalAlignment="Bottom" HorizontalAlignment="Right"  Orientation="Horizontal"  >
            <Button Content="Sauvegarder les changements" Margin="3" Padding="2" Background="White"/>
        </StackPanel>
    </Grid>
</UserControl>
